<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="i1" placeholder="请输入1-100之间的整数">
<input type="button"value="猜一猜" onclick="fn()">
<div></div>

<script>
    let x=parseInt(Math.random()*100+1);
    let count=0;
    function fn(){
        i=document.querySelector("#i1");
        d=document.querySelector("div");
        count++;

    }
</script>
</body>
</html>